/*
 * @Descripttion:
 * @version:
 * @Author: 穆宏宇
 * @Date: 2020-08-24 14:18:18
 * @LastEditors: 穆宏宇
 * @LastEditTime: 2020-11-09 18:22:05
 */
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// import './views/mall/mobile/iconfont/iconfont.css'

import permission from './directive/permission'
Vue.use(permission)

// 引入ElementUI
import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'

// 图标文件
// import '@/icon/ant/iconfont.css'

// 引入表单组件
// import FormMaking from 'form-making'
// import 'form-making/dist/FormMaking.css'

// 引入下拉树组件
// import Treeselect from '@riophae/vue-treeselect'
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'

// 引入自定义插件
import installPlugin from '@/plugin'

// 引入数字计算
// import * as math from 'mathjs'
// import { create, all } from 'mathjs'
// const math = create(all)

// 引入自定义组件
import eTable from '@/components/e-table'
import Epagination from '@/components/e-pagination'
import Pagination from '@/components/Pagination'
// 引入工具包
import tools from '@/tools'
// 引入校验方法
// import validations from '@/validations'

// 引入请求方法
import api from '@/api'

// 引入elementUI基础样式
import '@/styles/element.base.scss'

// 引入基础样式文件
import './styles/base.scss'

// 引入配置文件
import config from '@/config'

// 使用ElementUI
Vue.use(ElementUI)

// 使用表单组件
// Vue.use(FormMaking)

// 注册自定义插件
installPlugin(Vue)

// 绑定请求方法
Vue.prototype.$api = api

// 绑定工具方法
Vue.prototype.$tools = tools

// 绑定校验方法
// Vue.prototype.$validations = validations

// 绑定数字计算
// Vue.prototype.$math = math

// 绑定配置
// eslint-disable-next-line
Vue.prototype.$config = config

Vue.config.productionTip = false

// 注册全局组件
Vue.component('e-table', eTable)
Vue.component('e-pagination', Epagination)
// Vue.component('Treeselect', Treeselect)

import VueLazyLoad from 'vue-lazyload'
Vue.use(VueLazyLoad,{
    error:require('@/assets/mall-images/none.png'),
    loading:require('@/assets/mall-images/loading.png')
})




import '../package/activity/theme/element-variables.scss'
import 'element-ui/lib/theme-chalk/icon.css'

import { vuePlugin } from '@/highlight'
import 'highlight.js/styles/atom-one-dark-reasonable.css'
Vue.use(vuePlugin)

import MyPD from '../package/activity/index.js'
Vue.use(MyPD)
import supplierPD from '../package/supplierActivity/index.js'
Vue.use(supplierPD)
import commonPD from '../package/activity-common/index.js'
Vue.use(commonPD)
import '../package/activity/theme/index.scss'

import 'bpmn-js/dist/assets/diagram-js.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css'

// import "bpmn-js-properties-panel/dist/assets/bpmn-js-properties-panel.css"; // 右边工具栏样式

// import { getDicts } from "@/api/activiti/definition.js";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree, checkPermissions } from '@/util/ruoyi'

import axios from 'mhyaxios2'
Vue.prototype.$axios = axios
// Vue.prototype.getDicts = getDicts
Vue.component('Pagination', Pagination)


Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.checkPermissions = checkPermissions

import ECharts from 'vue-echarts/components/ECharts'
import 'echarts/lib/chart/line'
Vue.component('chart', ECharts)


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
